<template>
  <div class="course-detail-page">
    <nav-bar :title="courseDetail.chapterName" theme="blue" message></nav-bar>
    <div class="page-main" style="margin-top: 44px">
      <div v-html="courseDetail.subjectContent" class="course-detail-container"></div>
    </div>
  </div>
</template>
<script>
import learnTest from '@/api/learnTest'
export default {
  data() {
    return {
      courseCode: 0,
      courseDetail: {} // 课程列表
    }
  },
  computed: {},
  mounted() {},
  created() {
    this.getCourseDetail()
  },
  methods: {
    // 获取小节详情
    getCourseDetail() {
      const data = {
        chapterCode: this.$route.params.chapterCode
      }
      learnTest.Course.chapterDetail(data).then(res => {
        if (res.data.status === 0 && res.data.data) {
          this.courseDetail = res.data.data
        }
      })
    }
  }
}
</script>
<style scoped lang="less">
@import '~@/assets/style/learnTest/course/graphicDetail.less';
/deep/ .course-detail-container img {
  max-width: 100%;
}
</style>
